<template>
  <view id="navfooter">
    <view id="footer_nav" class="footer_nav" @click="flag=!flag">
      <u--image height="1.5rem" width="1.5rem" :src="navigation" mode="aspectFit"></u--image>
      <p>导航</p>
    </view>
    <view class="footer_nav_show" v-if="flag">
      <ul class="list">
        <li>
          <u--image height="1.5rem" width="1.5rem" :src="menu" mode="aspectFit"></u--image>
          <p>菜单</p>
        </li>
        <li>
          <u--image height="1.5rem" width="1.5rem" :src="cart" mode="aspectFit"></u--image>
          <p>购物车</p>
        </li>
        <li @click="toOrder">
          <u--image height="1.5rem" width="1.5rem" :src="order" mode="aspectFit"></u--image>
          <p>我的订单</p>
        </li>
        <li>
          <u--image height="1.5rem" width="1.5rem" :src="wallet" mode="aspectFit"></u--image>
          <p>结账</p>
        </li>
        <li @click="flag=!flag">
          <u--image height="1.5rem" width="1.5rem" :src="close" mode="aspectFit"></u--image>
          <p>返回</p>
        </li>
      </ul>

    </view>

  </view>
</template>

<script>

export default {
  data() {
    return {
      navigation: require('@/static/images/pages/menu/navigation.png'),
      menu: require('@/static/images/pages/menu/menu.png'),
      cart: require('@/static/images/pages/menu/cart.png'),
      order: require('@/static/images/pages/menu/order.png'),
      wallet: require('@/static/images/pages/menu/wallet.png'),
      close: require('@/static/images/pages/menu/close.png'),
      flag: false
    }
  },
  methods: {
    toOrder() {
      uni.$u.route(`/pages/order/foodOrder`);
    }
  }
};
</script>